package ee.rsi2m.goproject;



import ee.rsi2m.goproject.GTP.LIBRARY_CONSTANTS;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.TextView;

public class MenuActivity extends Activity implements OnClickListener {

	private native static void initGTP(float pMemory);
	public native static String playGTP(String pInput);
	public native static void setRules(int chineseRules);

	static {
		System.loadLibrary(LIBRARY_CONSTANTS.GNUGO_LIBRARY_NAME);
		initGTP(LIBRARY_CONSTANTS.GNUGO_MEMORY_SIZE);
	}

	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.startGame:
			Intent i = new Intent(this, NewMatchActivity.class);
			
			startActivity(i);
			break;
		case R.id.settings:
			break;
		case R.id.about:
			break;
		case R.id.exit:
			finish();
			break;
		}

	}

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.menu);

		ImageButton tv = (ImageButton) findViewById(R.id.startGame);
		tv.setOnClickListener(this);
		ImageButton tv1 = (ImageButton) findViewById(R.id.exit);
		tv1.setOnClickListener(this);
		/*
		 * tv1.setOnClickListener(this); tv2.setOnClickListener(this);
		 * tv3.setOnClickListener(this);
		 */

	}

}
